home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Hardware modification d2.adf / genlock < prev    next >
Text File  |  1988-07-04  |  20KB  |  448 lines

  1. Genlock circuit operation description
  2. -----------------------------------------------------------
  3.  
  4. Enhancements:
  5.  
  6.    One feature that space does not allow for now is the ability to
  7. have software control of pixel switch disable. Now this is done with a
  8. mechanical switch. Pixel switch disable allows the user to completely
  9. ignore background video, yet have the Amiga computer genlocked. This
  10. eliminates the problem of software having to be written with genlock
  11. in mind. It would add $5-$10 to cost of goods. The control bits would
  12. be encoded in the vertical interval, as audio on/off is presently
  13. done. Eight to sixteen functions (bits) could be controlled once this
  14. ability is on the board.
  15.  
  16.   CHROMA KEY -- since all signals are in RGB format, it would be easy
  17. to selectively insert video based on color level. Additional circuitry
  18. would add about $10, but would not fit in the existing case.
  19.  
  20.  
  21. ============================================================
  22. Circuit description
  23.  
  24. The purpose of the genlock peripheral is to synchronize the video
  25. output of the Amiga computer with another video source such as camera,
  26. broadcast, or VCR. Circuitry inside the peripheral allows for the
  27. overlay of computer graphics on whatever video source is connected.
  28. Also provided are facilities for stereo mixing of computer and source
  29. audio. Input to the genlock peripheral is composite source and analog
  30. RGB computer video. Output video is in the forms of composite and
  31. analog RGB for high-resolution viewing on an RGB monitor. Also output
  32. are a master 28.636363 MHZ computer clock, H/2, and V/2 video resets
  33. required to synchronize the computer's graphic devices. Power for this
  34. device is derived from computer +5, +12, -5 volts D.C. rails.
  35.  
  36. Circuitry in the peripheral is divided into several main functions
  37. which are: 1) regenerating the horizontal and vertical components of
  38. the original composite source video, (2) phase locking the 28 MHZ
  39. clock to input video horizontal timing, (3) combining source and
  40. computer video, (4) mixing source and computer audio, (5) and encoding
  41. the RGB overlayed video into NTSC or PAL. 
  42.  
  43. (1)  REGENERATING HORIZONTAL AND VERTICAL TIMING
  44.  
  45. Source composite video enter on J1. Transistors Q16 and Q7 form a
  46. feedback amplifier with a gain of 3. Simple sync tip clamping is
  47. provided by CR3, whose clamp voltage is set by CR4. The net effect is
  48. to clamp sync tips at around 0 volts. Comparator U3 strips the sync
  49. off of the clamped composite video on it's pin 4. Comparator trip
  50. point is set by resistive divider R55 and R49 to be at about the 50%
  51. amplitude point on the sync. On the output of U3 (pin 9) is composite
  52. sync at TTL levels.
  53.  
  54. One-shot U1 is a digital integrator designed to detect when video
  55. drops out for more than 12 lines. The output of this detector forces
  56. crystal mode operation (Q4 enables power to the crystal oscillator)
  57. and selects computer composite sync (J8-19) to insure a stable monitor
  58. picture. Nand gates in U5 form the sync selector logic.
  59.  
  60. The composite sync output of selector U5 is decoded into its
  61. horizontal and vertical components. The time constants of
  62. differentiator C21/R56 and one-shot U12 are chosen to trigger only on
  63. the horizontal components of sync. Output on U12 pin 5 is a series of
  64. pulses at a horizontal rate. One-shot U19 forms a negative going
  65. pulse 4.7 microseconds wide buffered by U23 for monitors requiring
  66. seperate horizontal sync (J10-11). The time constants of integrator R77/R76
  67. /C34 and one-shot U12 are chosen to trigger only on the vertical
  68. component of composite sync. The output on U12 pin 4 is a pulse 90
  69. microseconds wide on line 3 every vertical interval. One-shot U19
  70. generates a negative pulse 200 microseconds wide buffered U23 for
  71. monitors requiring seperate vertical sync (J10-10).
  72.  
  73. The graphic devices in the Amiga computer require reset every other
  74. vertical interval in genlock mode. Dual-D flip flop U15 performs this
  75. task. It is basically wired as a divide by 2 with horizontal sync
  76. clocking the first stage. This causes the V/2 reset pulse to be
  77. synchronous with horizontal, one line wide, retiming its edges. V/2
  78. reset is buffered by R10 because at times the Amiga computer will
  79. output vertical pulses on J9-23, (ie. genlock mode not selected with
  80. peripheral attached).
  81.  
  82. The sandcastle generator is made up of U2, U7, Q5, and Q6. This
  83. circuitry generates a multi-level pulse, encoding burst and blanking
  84. timing information for U8, the chroma decoder. One-shot U2 time
  85. constants are chosen to generate the blanking portion of the sandcastle
  86. pulse. One-shot U7 time constants are chosen to generate burst timing.
  87. Transistor pair Q5 and Q6 form a low impedance wide-band inverting
  88. summing amplifier. R27 supplies a D.C. offset to give the correct D.C.
  89. levels at Q6 collector for U8.  R26 and R31 sum in the blanking and
  90. burst signals respectively. The gain of any signal to this amplifier
  91. is set by the ratio of the input series resistor (R26, R31, R27) to
  92. feedback resistor R28. The sandcastle pulse at Q6 collector encodes
  93. blanking information from 0-5V dc and burst timing from 5-10V dc, with 
  94. the pulse looking very much like it's name implies.
  95.  
  96. H/2 reset is generated by U14 and U17. The input to one-shot U14 is
  97. regenerated horizontal from the 28 MHZ phase-locked loop. U14 time
  98. constant is 33 microseconds, making a square wave at horizontal rate on
  99. pin 12. Dual D-type flip flop U17 is wired as a gated divide by 2. The 
  100. H/2 reset output (J9-21) is a negative going pulse 32 microseconds wide,
  101. with the edges retimed to the Amiga computer color clock (J9-6). This
  102. re-timing to color clock is required to guard against metaphysical
  103. states in the Amiga graphical devices.
  104.  
  105. (2) 28 MHZ PHASE LOCKED LOOP
  106.  
  107. The circuitry to generate the 28.636363 MHZ clock is comprised of the
  108. voltage controlled/crystal oscillators, phase detector, and divider, the
  109. classic phase-locked loop. The VCO has some unique features.
  110.  
  111. The genlock peripheral must generate a stable master clock, allowed to
  112. vary only a few percent in genlock mode. When there is no video on the
  113. peripheral input, crystal stability is required for real-time clocks and
  114. counters. To complicate things the Amiga computer cannot tolerate large
  115. timing variations when switching in and out of genlock mode, missing a
  116. clock cycle is catastrophic. Therefore, a circuit was designed so that a
  117. crystal oscillator can "tickle" the voltage controlled oscillator for
  118. completely synchronous mode switching.
  119.  
  120. Q24 and its associated circuitry is the 28 MHZ Colpitts crystal
  121. oscillator. Q23 is a buffer to prevent loading of Q24. Power for Q23 and
  122. Q24 is controlled by Q4, supplying current only when there is no input
  123. video (xtal mode required).
  124.  
  125. Q13 and its associated components form a Colpitts voltage controlled
  126. oscillator. The frequency is changed by varying the D.C. control voltage
  127. on CR7, a varactor diode. C60 varies the VCO center frequency. The
  128. connection made by C63 and R128 allows the crystal oscillator to 
  129. "tickle" the VCO. For an in-depth discussion on oscillators, consult 
  130. "Crystal oscillator Circuits" by Robert J. Matthys.
  131.  
  132. Q12 buffers the 28 MHZ clock to the Amiga, (J9-1) setting the correct
  133. TTL levels with R64 and R65.  L2 and C41 filter the 28 MHZ to reduce
  134. RFI.
  135.  
  136. A synchronous divide by 1820 is formed by U6, U10, U13, U16, U4. U16
  137. is a schottky device because of the frequency involved. Operation of
  138. this circuit is straightforward. The output of U6 pin 13 is a stream of
  139. pulses at a horizontal rate. This is called regenerated horizontal and
  140. is never interrupted, an Amiga requirement. This signal is one input to
  141. the phase detector. 
  142.  
  143. The phase detector used is the analog sample and hold type. Basically,
  144. this detector works by sampling a ramp generated from one comparison
  145. frequency (feedback) with a sample pulse derived from the other 
  146. (reference). The output D.C. is used to control the VCO.
  147.  
  148. The reference input for this phase detector is the horizontal component
  149. of input video, applied to one-shot U11 pin 1. Delay in U11 is about 1/2
  150. line, with a potentiometer to fine tune horizontal position, R133. U14
  151. generates a short sample pulse (275 nanoseconds), level shifted by Q14.
  152. Q14 collector drives sample gate Q25, with the sample voltage held on C78.
  153.  
  154. The feedback input goes to the other section of U11, again adding a 1/2
  155. line delay. The output of U11 is used to trigger the ramp generator
  156. formed by Q21 and Q22. Ramp charge time is controlled by C52 and is
  157. designed to accomodate the large timebase errors present in VCR
  158. playback. Ramp charge time is critical in PLL design: steeper ramp means
  159. high gain and less lock range, slower ramp means lower gain but increase
  160. in tracking range. 
  161.  
  162. The D.C. operating point for this loop is determined by a voltage
  163. divider formed by R106, R156, and R157. It is chosen to give maximum
  164. dynamic range. 
  165.  
  166. Error signal on C78 is buffered by dual op-amp U20, section 1. Loop time
  167. constants are determined by the R105, C61, C67, R131 around section 2 of 
  168. U20. The output of this section drives the VCO, closing the control loop.
  169.  
  170. (3)  COMBINING SOURCE AND COMPUTER VIDEO
  171.  
  172. Now that the Amiga computer is synchronous with the source video,
  173. computer and source video is combined. U8 alone performs the overlay
  174. function. 
  175.  
  176. The main function of U8 (TDA3301) is to decode composite video into its
  177. red, green, and blue components. First, source video is split apart into
  178. chrominance and luminance. Network L1, C27 and R52 filters out chroma,
  179. passing luminence only information to U8-37. Network R83, L3, C43, and
  180. C28 passes only chroma information to U8-1. U8 also internally has a
  181. 3.579545 MHZ PLL. By utilizing luminance, chrominance, sandcastle pulse,
  182. frame pulse (U28-29) and an internal PLL, video is decoded.
  183.  
  184. U8 also has inputs for external analog RGB video. Computer RGB is
  185. applied to U8 pins 25, 26, and 24 respectively. The signal that
  186. determines if source on computer video is ultimately output is pixel
  187. switch (J9-4). This is a software generated control line from the Amiga.
  188. One section of gate U5 is used to force pixel switch to show only
  189. computer video when source video is lost. 
  190.  
  191. Each video output of U8 is D.C. clamped for black level stability. The
  192. following is a description of just the blue channel. Blue video exits U8
  193. on pin 14. The level is divided down by resistors R71 and R72 and
  194. feedback to pin 16 completing the loop. C25 is used to hold the sampled
  195. clamp value (see Motorola data sheet for full details). The blue video
  196. is then amplified X2 by transistor feedback pair Q10 and Q11. Gain is
  197. set by the ratio of R60/R61. R63 gives the characteristic line impedance
  198. of 75 ohms (J10-5). Operation is similar for the green and red channels.
  199. Other components around U8 are best understood by consulting the TDA3301
  200. data sheet. 
  201.  
  202. A hue control (R134) is provided to allow user color matching of
  203. computer and source video.
  204.  
  205. (4) MIXING SOURCE AND COMPUTER AUDIO
  206.  
  207. The left audio channel mixer is described. Source audio (J3) is
  208. capacitivly coupled by C82 and terminated in an impedance of 47K.
  209. Electronic switch U22 (CD4066BE) is used to disable source audio via
  210. computer control. It operates as follows.
  211.  
  212. The control to enable/disable source audio is encoded in the vertical
  213. and horizontal blanking interval of the pixel switch line, software
  214. setable on the Amiga computer. U18 samples pixel switch during the
  215. vertical interval, using the frame pulse to latch audio status. The
  216. latched output (U18 pins 6&5) is used to control transmission gates in
  217. U22. Data is latched on or about line number 10. No horizontal sampling
  218. is done. 
  219.  
  220. Computer audio enter on J5. Passive mixing network R140, 141, 143, 142
  221. and control R132 combines the two sources. Pot R132 allows user control
  222. relative levels. Right and left mixing is controlled by the same shaft. 
  223.  
  224. Feedback pair Q19 and Q20 provide gain (x3) to make up for losses in the
  225. passive mixer. C83 provides bandlimiting (20KHZ) to reduce noise pick-up
  226. within the box. Audio and video grounds are kept seperate until the
  227. connector (J9).
  228.  
  229. (5) ENCODING THE RGB VIDEO
  230.  
  231. Analog RGB signals are encoded into NTSC or PAL by a single device (U21)
  232. from Motorola, number MC1377. This IC requires only continuous
  233. subcarrier and composite sync to output composite video. Subcarrier is
  234. obtained from the oscillator in U8, coupled by C45. Sync comes from the
  235. output of selector U5.
  236.  
  237. The analog RGB signals (0-1v amp.) from U8 are coupled into pins 3,5
  238. and 4 of U21. Inside the MC1377 a resistive matrix and multipliers
  239. transform RGB into an encoded chroma signal, output on pin 13. To reduce
  240. interference with high frequency luminance information, the chroma is
  241. bandpass filtered to 1 MHZ by T1, R11, C72, and C70. Chroma re-enters
  242. the chip on pin 10.
  243.  
  244. The luminance signal is derived via an internal matrix from the RGB
  245. input?? output inverted on pin 6. TD1 delays the luminance information
  246. by 400 ns making up the time delay caused in the chroma path by the
  247. bandpass filter. Chroma and luma are summed and clamped inside U21,
  248. emerging on pin 9 as composite video. Emitter follower Q15 buffers the
  249. video to J6. 
  250.  
  251. Color burst is also added to the video inside U21. External components
  252. R95 and C69 determine burst position. Pin 16 is a stable zener derived
  253. 8.5 volts.
  254.  
  255.   If you would like to receive your own hard-copy of this spec,
  256. please leave email in mailbox 'techs'
  257.  
  258.    IMPORTANT: Please make our job easier by including the word
  259.               'genlock' somewhere in the Subject line!!
  260.  
  261. Don't forget to leave your name and address.
  262.  
  263. I didn't leave out much, the table of contents, a short discussion
  264. of possible uses, a diagram that shows the location of each
  265. connector (to be posted next week) and a drawing the shows the
  266. genlock box and its mechanical interface.
  267.  
  268. Thank you, 
  269.  
  270. Randy Weiner  <<rweiner>> Commodore Technical Support
  271.  
  272. The following material is excerpted from the preliminary Genlock
  273. spec. 
  274.  
  275. Please excuse any non-obvious typos, it will take me a week
  276. to uncross my eyes.
  277.           Thank you ,  Randy Weiner  'rweiner'
  278.  
  279.  
  280.        Excerpts from the Amiga Genlock Peripheral Specification
  281.  
  282.  
  283.  
  284. CONNECTORS
  285. ==================================================
  286.  
  287. Female 23-pin "D" type (to computer)
  288. --------------------------------------------------
  289.     pin 1 :         28.636360 MHZ clock out
  290.      2 :       external clock enable out
  291.      3 :       red analog video in
  292.      4 :       green analog video in
  293.      5 :       blue analog video in
  294.   6,7,8,9 :         no connection
  295.      10:       composite sync in
  296.      11:       H/2 reset out
  297.      12:       V/2 reset out
  298.      13:       ground
  299.      14:       pixel switch in
  300.      15:       color clock (3.58 MHZ) in
  301.      16,17:         ground
  302.      18,19:         ground
  303.      20:       ground
  304.      21:       -5 volts in
  305.      22:       +12 volts in
  306.      23:       +5 volts in
  307.  
  308. Male 23-pin "D" type (to monitor)
  309. --------------------------------------------------
  310.     pin 1 :         no connection
  311.      2 :       no connection
  312.      3 :       red analog video out
  313.      4 :       green analog video out
  314.      5 :       blue analog video out
  315.   6,7,8,9 :         no connection
  316.      10:       composite sync out
  317.      11:       horizontal sync out
  318.      12:       vertical sync out
  319.      13:       ground
  320.      14,15:         no connection
  321.      16,17:         ground
  322.      18,19:         ground
  323.      20:       ground
  324.   21,22,23:         no connection
  325.  
  326. RCA-type jacks (8)
  327. --------------------------------------------------
  328.      1 :       composite source video in
  329.      2 :       composite video out
  330.      3 :       R-source audio in
  331.      4 :       L-source audio in
  332.      5 :       R-computer audio in
  333.      6 :       L-computer audio in
  334.      7 :       R-mixed audio out
  335.      8 :       L-mixed audio out
  336.  
  337.  
  338.  
  339.  
  340. VIDEO PERFORMANCE
  341. ==================================================
  342.  
  343. Bandwith:
  344.      composite      -3db luminance at 8 MHZ
  345.      Analog RGB          -3db at 8 MHZ
  346.      Chroma I&Q          -3db at 0.5 MHZ
  347.  
  348. Locking Range:
  349.      Horizontal          +/- 2% from 15735 HZ
  350.      Subcarrier          +/- 300 HZ from 3.579545 MHZ
  351.      Vertical       crash lock
  352.      Horizontal phase    +/- 1.5 microseconds
  353.      Subcarrier phase    +/- 45 degrees from burst
  354.  
  355. Timing:
  356.      Vertical       reset output is 3 lines late
  357.      Horizontal          reset output is coincident with input
  358.      Clock jitter        <10ns, 5ns typ. in genlock,
  359.                       crystal stable with no video source
  360.      28 MHZ clock        in genlock mode, is phase locked to 
  361.                       input horizontal timing. Automatic
  362.                       switch over to crystal mode occurs in 
  363.                       10 lines of missing source video. No
  364.                       discontinuity in clock cycles occurs.
  365.  
  366. AUDIO PERFORMANCE
  367. ==================================================
  368.  
  369. Bandwidth:
  370.      -3db at 12 HZ and 500 KHZ, flat with 2db
  371.  
  372. Gain:
  373.      0 to -50db dependent on mix control setting
  374.  
  375.      source audio can be disabled (-50db) by setting a bit in pixel
  376.        switch line during vertical blanking
  377.  
  378.  
  379. INPUT SPECIFICATIONS
  380. ==================================================
  381.  
  382. Female 23-pin "D" type (to computer)
  383. --------------------------------------------------
  384.     pin 3 :    analog red -- terminated in 75 ohms, inut level of 
  385.             1 volt p-p nominal level.
  386.      4 :  analog green -- same as analog red
  387.      5 :  analog blue -- same as analog red
  388.      10:  composite sync -- TTL level, 10K load, negative going
  389.      14:  pixel switch -- TTL level, 1K load, low level enables
  390.             external RGB for overlay. During vertical interval, 
  391.             a low level of pixel switch enables external audio,
  392.             high level disables. This level is valid during 
  393.             horizontal and vertical blanking.
  394.      15:  color clock -- TTL level, 4K load, should be synchronous
  395.             with host computer, freq. of 3.579545 MHZ.
  396.      21:  -5 volts, approx. 50ma load.
  397.      22:  +12 volts, approx. 250ma load.
  398.      23:  +5 volts, approx. 300ma load.
  399.  
  400.  
  401.  
  402.  
  403.  
  404. RCA type jacks
  405. --------------------------------------------------
  406.      composite video -- 75 ohm load, 1 volt p-p, 0.3 volt sync,
  407.           +/- 6db, will accept block vertical
  408.      R-source audio -- 4000 ohm load, 1 volt rms nominal
  409.      L-source audio -- same as above
  410.      R-computer audio -- same as above
  411.      L-computer audio -- same as above
  412.  
  413. OUTPUT SPECIFICATIONS
  414. ==================================================
  415.  
  416. Female 23-pin "D" type (to computer)
  417. --------------------------------------------------
  418.  
  419.     pin 1 :    28.636360 clock -- semi-sinusoid, able to drive two
  420.             schottky TTL loads
  421.      2 :  external clock enable -- low active, direct connect. to gnd.
  422.      11:  horizontal reset out -- low active, 'LS244 driver, low for
  423.             32 microseconds at beginning of a horizontal line.
  424.      12:  vertical reset out -- low active, 'LS244 driver, occurs
  425.             on line 3, 30 microseconds wide.
  426.  
  427. Male 23-pin "D" type (to monitor)
  428. --------------------------------------------------
  429.     pin 3 :    red analog video - 75 ohm impedance, will drive 1 volt p-p
  430.             into 75 ohms load
  431.      4 :  green analog video - same as pin 3
  432.      5 :  blue analog video - same as pin 3
  433.      10:  composite sync -- low active, 'LS244 driver
  434.      11:  horizontal sync -- low active, 'LS244 driver, 
  435.             4.7 microseconds wide
  436.      12:  vertical sync -- low active, 'LS244 driver, 3 horizontal
  437.             lines wide.
  438.  
  439. RCA jacks
  440. --------------------------------------------------
  441.      composite video out - 75 ohm impedance, 1 volt p-p into 75 ohm
  442.        load, 0.3 volts sync.
  443.      
  444.      R-mixed audio -- 100 ohm impedance, 1 volt RMS into 600 ohms.
  445.  
  446.      L-mixed audio -- same as above
  447.  
  448.